package com.kehutong.admin.entity;

import com.kehutong.admin.enums.JumpType;
import com.kehutong.admin.enums.SourceType;
import org.coraframework.bean.valid.CheckField;
import org.coraframework.json.annotation.JSONField;
import org.coraframework.orm.Entity;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.Table;
import org.coraframework.orm.util.IDType;

/**
 * @program: 广告管理
 * @description: heleo
 * @author: joneron
 * @create: 2021/5/21
 **/
@Table(value="sys_advert", comment="广告管理", idType = IDType.TIMESTAMP)
public class Advert extends Entity {

    private static final long serialVersionUID = -4805991833873864565L;

    protected Advert(String id) {
        super(id);
    }

    @Column(comment="广告图片id")
    private String imgId;

    @CheckField("问题标题不能为空")
    @Column(comment="广告标题")
    private String title;

    @Column(comment="跳转类型")
    private JumpType jumpType;

    @Column(length=255, comment = "跳转连接")
    private String url;

    @Column(comment="开始时间")
    //@JSONField (serialize = false, format="yyyy-MM-dd HH:mm:ss")
    private String startTime;

    @Column(comment="结束时间")
    //@JSONField (serialize = false, format="yyyy-MM-dd HH:mm:ss")
    private String endTime;

    @Column(comment="排序值")
    private Integer sortNum;

    @Column(comment="是否显示")
    private boolean status;

    @Column(comment="点击数量")
    private int clickNum;

    @JSONField(serialize = false)
    @Column(comment = "逻辑删除")
    private boolean deleted;

    @Column(comment = "创建人")
    private String createName;

    @Column(comment="归属")
    private SourceType source;

    public String getImgId() {
        return imgId;
    }

    public void setImgId(String imgId) {
        this.imgId = imgId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public JumpType getJumpType() {
        return jumpType;
    }

    public void setJumpType(JumpType jumpType) {
        this.jumpType = jumpType;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public Integer getSortNum() {
        return sortNum;
    }

    public void setSortNum(Integer sortNum) {
        this.sortNum = sortNum;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public int getClickNum() {
        return clickNum;
    }

    public void setClickNum(int clickNum) {
        this.clickNum = clickNum;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public SourceType getSource() {
        return source;
    }

    public void setSource(SourceType source) {
        this.source = source;
    }
}
